define([],function(){
	var tpl = {};
	/*
	 * 成功：
	 */
	tpl.failure = function(){
		var html = "";
		html += failure();
		return html;
	}
	tpl.success = function(){
		var html = "";
		html += success();
		return html;
	}
	var success = function(){
		return '<script type="text/html" id="success-tpl">'+
					'<div class="status_img">'+
						'<img src="page/patientsQuestionnaire/img/success.png" alt=""/>'+
					'</div>'+
					'<div class="text-center">'+
						'<p class="status-res">提交成功！</p>'+
						'<p>您已成功提交问卷，感谢您对于我们工作的支持！</p>'+
					'</div>'+
					//wxf 如果是   OSI职业紧张压力问卷  界面出现  跳过   继续       LES生活事件则跳过
					'{{if data.nextType=="LES"}}'+ 
					 	'<div class="next-operate">'+
							'<p class="next-tips text-center">请继续填写下一量表</p>'+
							'<p class="ques-name" id = "ques_name" userId = "{{data.userId}}" queueId = "{{data.queueId}}" nextType ="{{data.nextType}}" deptId = "{{data.deptId}}">{{data.evaTitle}}</p>'+
						'</div>'+
					'{{else if data.nextType=="OSI"}}'+
					 	'<div class="next-operate">'+
							'<p class="next-tips text-center">继续填写量表或跳过</p>'+
							'<p class="ques-name" id = "ques_name" userId = "{{data.userId}}" queueId = "{{data.queueId}}" nextType ="{{data.nextType}}" deptId = "{{data.deptId}}">继续填写：{{data.evaTitle}}</p>'+
							'<p class="ques-name" id = "jumpFn" userId = "{{data.userId}}" queueId = "{{data.queueId}}" nextType ="{{data.nextType}}" deptId = "{{data.deptId}}" style="margin-top:0.5em">跳过填写</p>'+
						'</div>'+
					'{{else}}'+
					 	'<div class="next-operate">'+
							'<p class="next-tips text-center">您已完成所有问卷</p>'+
						'</div>'+
					'{{/if}}'+ 
				'</script>'
	};
	var failure = function(){
		return '<script type="text/html" id="failure-tpl">'+
					'<div class="status_img">'+
						'<img src="page/patientsQuestionnaire/img/failure.png" alt=""/>'+
					'</div>'+
					'<div class="text-center">'+
						'<p class="status-res">提交失败！</p>'+
						'<p>失败原因：{{if msg}}{{msg}}{{else}}{{code}}{{/if}}</p>'+
					'</div>'+
				'</script>'
	};
	return tpl;
});

